<div class="row">
  <div class="col-md-6" *ngFor="let item of situationlist;">
    <!-- /.info-box -->
    <div class="info-box" [ngClass]="{'bg-red':(item.logs.length>0)&&(item.logs[0].state=='failed'),'bg-blue': item.logs.length==0,'bg-green':(item.logs.length>0)&&(item.logs[0].state=='complete')}">
      <span class="info-box-icon">
        <i class="fa fa-close" *ngIf="(item.logs.length>0)&&(item.logs[0].state=='failed')"></i>
        <i class="fa fa-check" *ngIf="(item.logs.length>0)&&(item.logs[0].state=='complete')"></i>
        <i class="fa fa-minus" *ngIf="(item.logs.length==0)"></i>
      </span>

      <div class="info-box-content">

        <span class="info-box-text">{{item.name}}</span>
        <span class="info-box-number">{{item.cron}}</span>

        <div class="progress">
          <div class="progress-bar" style="width: 100%"></div>
        </div>
        <span class="progress-description" *ngIf="(item.logs.length>0)&&(item.logs[0].state=='failed')">执行失败
          <button class="btn btn-danger btn-xs pull-right btn-border" data-toggle="modal" (click)="transForm(item.logs[0].remark)" data-target="#myModal">查看错误信息</button>
        </span>
        <span class="progress-description" *ngIf="(item.logs.length>0)&&(item.logs[0].state=='complete')">执行成功</span>
        <span class="progress-description" *ngIf="(item.logs.length==0)">未执行</span>

      </div>
      <!-- /.info-box-content -->
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel" *ngIf="(item.logs.length>0)&&(item.logs[0].remark!=null)">
      <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="gridSystemModalLabel">错误日志</h4>
          </div>
          <div class="modal-body">
            <div class="row">
              <div class="col-md-12 ">
                <textarea   [value]="newData" name="textarea" class="form-control textarea-size" id="textarea" cols="30" rows="10" disabled="disabled"></textarea>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

          </div>
        </div>
        <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
    </div>
  </div>

</div>
